package com.ruoyi.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论实体对象 hz_comment
 *
 * @author ruoyi
 * @date 2021-08-08
 */
public class HzComment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    public HzComment() {

    }

    public HzComment(Long userId, Long uploadInfoId, String commentMsg) {
        this.userId = userId;
        this.uploadInfoId = uploadInfoId;
        this.commentMsg = commentMsg;
        this.addTime = new Date();
    }

    /**
     * 评论主键id
     */
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 上传信息id
     */
    private Long uploadInfoId;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String commentMsg;

    /**
     * 评论时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUploadInfoId(Long uploadInfoId) {
        this.uploadInfoId = uploadInfoId;
    }

    public Long getUploadInfoId() {
        return uploadInfoId;
    }

    public void setCommentMsg(String commentMsg) {
        this.commentMsg = commentMsg;
    }

    public String getCommentMsg() {
        return commentMsg;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("uploadInfoId", getUploadInfoId())
                .append("commentMsg", getCommentMsg())
                .append("addTime", getAddTime())
                .toString();
    }
}
